<template>
  <div>
    <!-- 外层容器 -->
    <el-container>
      <!-- 上半区域：顶栏 -->
      <el-header class="layout-header">
        <!-- 顶栏的标题文字 -->
        <h1>仓储后台管理系统</h1>
      </el-header>
      <!-- 下半区域 -->
      <el-container class="layout-body">
        <!-- 下半区域的左侧边栏 -->
        <el-aside class="layout-aside">
          <el-menu
              router
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"
              background-color="#222"
              text-color="#fff"
              active-text-color="#fff">
            <!-- 主页 -->
            <el-menu-item index="/admin/index">
              <i class="el-icon-s-home"></i>
              <span>主页</span>
            </el-menu-item>
            <!-- 入库管理 -->
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>入库管理</span>
              </template>
              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">表单提交</span>
              </el-menu-item>

              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">入库信息</span>
              </el-menu-item>

            </el-submenu>
            <!-- 库存管理 -->
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>库存管理</span>
              </template>
              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">调库入库</span>
              </el-menu-item>
              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签类别</span>
              </el-menu-item>
            </el-submenu>
            <!-- 出库管理 -->
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>出库管理</span>
              </template>
              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签类别</span>
              </el-menu-item>
            </el-submenu>
            <!-- 仓库管理 -->
            <el-submenu index="4">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>仓库管理</span>
              </template>
              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签类别</span>
              </el-menu-item>
            </el-submenu>
            <!-- 报表管理 -->
            <el-submenu index="5">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>报表管理</span>
              </template>
              <el-menu-item index="/admin/index">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签类别</span>
              </el-menu-item>
            </el-submenu>
          </el-menu>
        </el-aside>
        <!-- 下半区域的右侧主体 -->
        <el-main class="layout-main">
          <!-- 由其它视图组件来显示 -->
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>


<style>
.layout-header {
  background: #1684b0;
}

.layout-header h1 {
  color: #fff;
  line-height: 60px;
}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

.layout-aside {
  background: #222;
}

.layout-aside .el-menu {
  border: 0;
}

.layout-aside i {
  color: #fff !important;
}

.layout-main {
  background: #fff;
}

.el-menu-item.is-active {
  background: #2d3c4d !important;
}
</style>
<script>
export default {
  data() {
    return {}
  },
  methods: {}
}
</script>
